 public static void main(String[] args) {

    List<String> list1 = new ArrayList<String>();
    list1.add("aa");
    list1.add("bb");
    list1.add("cc");
    String min=Collections.max(list1);
    System.out.println(min);
}

public static <T extends Object & Comparable<? super T>> T min(Collection<? extends T> coll)
{
    return Collections.max(coll);
}